﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for clsChuongHoc
/// </summary>
public class clsChuongHoc:BLL
{
    DataClassesDataContext objChuong = new DataClassesDataContext();
    private string TenChuong;

    public string TenChuong1
    {
        get { return TenChuong; }
        set { TenChuong = value; }
    }
    private string MsMonHoc;

    public string MsMonHoc1
    {
        get { return MsMonHoc; }
        set { MsMonHoc = value; }
    }
	public clsChuongHoc()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public void ThemChuong(string tenchuong, string mamon)
    {
        tbl_CHUONGHOC themchuong = new tbl_CHUONGHOC();
        int idmaxs = (int)objChuong.sp_GetCurrentInd("tbl_CHUONGHOC").ReturnValue;

        string mach = TaoMaAuto("MC", "0000", idmaxs);
        themchuong.MaChuong = mach;
        themchuong.MsMonHoc = mamon;
        themchuong.TenChuong = tenchuong;

        objChuong.tbl_CHUONGHOCs.InsertOnSubmit(themchuong);
        objChuong.SubmitChanges();

    }

}
